import request from '@/utils/request'

// 查询药品列表
export function listMedicine(query) {
  return request({
    url: '/medicine/medicine/list',
    method: 'get',
    params: query
  })
}

// 查询药品详细
export function getMedicine(id) {
  return request({
    url: '/medicine/medicine/medicineDetail',
    method: 'get',
    params: {
      id
    },
  })
}

// 新增药品
export function addMedicine(data) {
  return request({
    url: '/medicine/medicine/add',
    method: 'post',
    data: data
  })
}

// 修改药品
export function updateMedicine(data) {
  return request({
    url: '/medicine/medicine/update',
    method: 'post',
    data: data
  })
}

// 删除药品
export function delMedicine(ids) {
  return request({
    url: '/medicine/medicine/beachDelete',
    method: 'post',
    params: {
      ids
    },
  })
}
